#    Copyright 2008, 2009 Tri-County Electric Cooperative, St. Matthews, South Carolina
#    This file is part of COOPIP.
#    COOPGIP is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#    COOPIP is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#    You should have received a copy of the GNU General Public License
#    along with COOPIP.  If not, see <http://www.gnu.org/licenses/>.

#************************BEGIN Add Include Files to Path************************
import sys
NeededPaths=['/opt/coopip/djangoproject/include', '/opt/coopip/djangoproject']
for path in NeededPaths:
    if(not path in sys.path):
        sys.path.append(path)
#************************END   Add Include Files to Path************************


import djangoproject.models 
from django.contrib.gis.geos import GEOSGeometry
from django.contrib.gis.db import models
from django.contrib import admin
from django import forms
import django.contrib.gis.db.models




class IncidentUsernameAdmin(admin.ModelAdmin):
    formfield_overrides = { django.contrib.gis.db.models.TextField: {'widget': forms.TextInput(attrs={'size':20})},}

class IncidentAdmin(admin.ModelAdmin):
    formfield_overrides = { django.contrib.gis.db.models.TextField: {'widget': forms.TextInput(attrs={'size':20})},}

class IncidentNoteAdmin(admin.ModelAdmin):
    formfield_overrides = { django.contrib.gis.db.models.TextField: {'widget': forms.TextInput(attrs={'size':20})},}

class IncidentFileAdmin(admin.ModelAdmin):
    formfield_overrides = { django.contrib.gis.db.models.TextField: {'widget': forms.TextInput(attrs={'size':20})},}

class CountyAdmin(admin.ModelAdmin):
    formfield_overrides = { django.contrib.gis.db.models.TextField: {'widget': forms.TextInput(attrs={'size':20})},}

class NetworkDeviceAdmin(admin.ModelAdmin):
    formfield_overrides = { django.contrib.gis.db.models.TextField: {'widget': forms.TextInput(attrs={'size':20})},}

class DepartmentAdmin(admin.ModelAdmin):
    formfield_overrides = { django.contrib.gis.db.models.TextField: {'widget': forms.TextInput(attrs={'size':20})},}


admin.site.register(djangoproject.models.IncidentUsername, IncidentUsernameAdmin)
admin.site.register(djangoproject.models.Incident, IncidentAdmin)
admin.site.register(djangoproject.models.IncidentNote, IncidentNoteAdmin)
admin.site.register(djangoproject.models.IncidentFile, IncidentFileAdmin)
admin.site.register(djangoproject.models.County, CountyAdmin)
admin.site.register(djangoproject.models.NetworkDevice, NetworkDeviceAdmin)
admin.site.register(djangoproject.models.Department, DepartmentAdmin)


